package com.itheima.server.mapper;

import com.github.pagehelper.Page;
import com.itheima.server.domain.Contract;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.server.vo.ChannelContractReportVo;
import com.itheima.server.vo.OwnerShipContractReprtVo;
import org.apache.ibatis.annotations.MapKey;
import com.itheima.server.vo.DeptContractReportVo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
* @author li
* @description 针对表【hk_contract(合同信息表)】的数据库操作Mapper
* @createDate 2025-09-04 20:51:02
* @Entity com.itheima.server.domain.HkContract
*/
@Mapper
public interface ContractMapper extends BaseMapper<Contract> {

    Integer getActiAmountById(Long id);

    @MapKey("id")
    List<Map<String, Object>> activityStatistics(
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime);
    //,@Param("pageNum") Integer pageNum,@Param("pageSize")  Integer pageSize
    Page<DeptContractReportVo> getdeptStatisticsList(@Param("begin") LocalDate begin, @Param("end") LocalDate end);
@MapKey("id")
    List<Map<String, Object>> getSalesStatistics(@Param("beginTime") LocalDate beginTime,@Param("endTime") LocalDate endTime);

    Page<ChannelContractReportVo> getChannerStatisticsList(@Param("begin") LocalDate begin,@Param("end") LocalDate end);

    Page<OwnerShipContractReprtVo> getOwnerStatisticsList(@Param("begin") LocalDate begin,@Param("end") LocalDate end);
}




